package com.weetop.aklyscan.bean;

import android.os.Parcel;
import android.os.Parcelable;

import lombok.Data;

@Data
public class CartData implements Parcelable {
    private String c_id;
    private String pic;
    private String goods_name;
    private String properties_name;
    private String price;
    private String num;
    private String gp_id;
    private String is_activity;

    private String g_id;
    private String og_id;
    private String goods_info;
    private String total_price;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.c_id);
        dest.writeString(this.pic);
        dest.writeString(this.goods_name);
        dest.writeString(this.properties_name);
        dest.writeString(this.price);
        dest.writeString(this.num);
        dest.writeString(this.gp_id);
        dest.writeString(this.g_id);
        dest.writeString(this.og_id);
        dest.writeString(this.goods_info);
        dest.writeString(this.total_price);
    }

    protected CartData(Parcel in) {
        this.c_id = in.readString();
        this.pic = in.readString();
        this.goods_name = in.readString();
        this.properties_name = in.readString();
        this.price = in.readString();
        this.num = in.readString();
        this.gp_id = in.readString();
        this.g_id = in.readString();
        this.og_id = in.readString();
        this.goods_info = in.readString();
        this.total_price = in.readString();
    }

    public static final Creator<CartData> CREATOR = new Creator<CartData>() {
        @Override
        public CartData createFromParcel(Parcel source) {
            return new CartData(source);
        }

        @Override
        public CartData[] newArray(int size) {
            return new CartData[size];
        }
    };
}
